<template>
  <div >
<van-nav-bar
  :title="res.text"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
  @click-right="onClickRight"
/>

<div v-html="res.des" style="font-size:0.8rem;padding:0.2rem">
</div>

<van-list
  v-model="loading"
  :finished="finished"
  finished-text=""
  @load="onLoad"
>
  <van-cell v-for="(item,index) in res.combination" :key="`List${index}`"  :title="item.name" @click="gotoUrl(item)" />
</van-list>

</div>
</template>

<script>
import { mapState,mapGetters,mapMutations,mapActions } from "vuex";

export default {
  components: {

  },

  data() {
    return {
     loading:false,
     finished:true,
     List:[
        
     ],
     res:{
       combination:[],des:""
     }
    }
  },
  computed:{
    ...mapGetters("dataArr", ["classList"]),
   id(){
     return this.$route.params.id
   }
  },
  mounted(){
      this.classListF(this.id).then(res=>{
        console.log(19,res)
        this.res = res
      })
  },
  methods: {
     ...mapActions("dataArr", ["classListF"]),
     onLoad(){},
    onClickLeft() {
      // Toast('返回');
      this.$router.go(-1)

    },
    gotoUrl(val){
      if(val.con){
       this.$router.push({path:`/des/${this.id}/${val.index||314}`});
       return
      }
      this.$Toast('没时间录数据');
    },
    onClickRight() {
      // Toast('按钮');
      this.classListF(this.id).then(res=>{
console.log(res)
      })
      
    },

  }
};
</script>

<style lang="less">

</style>
